package com.example.musicalarm.util;

import java.util.ArrayList;
import java.util.List;

import com.example.musicalarm.R;

public enum WeekDay {

	Mon(R.id.checkBox_mon), Tue(R.id.checkBox_tue), Wed(R.id.checkBox_wed), Thu(
			R.id.checkBox_thu), Fri(R.id.checkBox_fri), Sat(R.id.checkBox_sat), Sun(
			R.id.checkBox_sun);

	private final int id;

	private WeekDay(int id) {
		this.id = id;
	}
	
	public int getId() {
	     return id;
	}
	
	public static List<WeekDay> getAllDays(){
		List<WeekDay> allDays = new ArrayList<WeekDay>();
		allDays.add(Mon);
		allDays.add(Tue);
		allDays.add(Wed);
		allDays.add(Thu);
		allDays.add(Fri);
		allDays.add(Sat);
		allDays.add(Sun);
		return allDays;
	}
	
	public static WeekDay getWorkDayById(int id){
		switch(id){
		case R.id.checkBox_mon:
			return Mon;
		case R.id.checkBox_tue:
			return Tue;
		case R.id.checkBox_wed:
			return Wed;
		case R.id.checkBox_thu:
			return Thu;
		case R.id.checkBox_fri:
			return Fri;
		case R.id.checkBox_sat:
			return Sat;
		case R.id.checkBox_sun:
			return Sun;
		default:
			return null;
		}
	}
}
